package com.sxit.tdf.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 橙子高
 * @since 2022-02-23
 */
@TableName("tb_file")
@Schema(name = "File对象", description = "")
public class File implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键")
  @TableId(value = "id", type = IdType.ASSIGN_UUID)
  private String id;

  @Schema(description = "文件名")
  private String fileName;

  @Schema(description = "文件后缀")
  private String fileSuffix;

  @Schema(description = "文件路径的id")
  private Integer filePathId;

  @Schema(description = "文件的筒id")
  private Integer fileBucketId;

  @Schema(description = "是否删除")
  @TableLogic
  private Integer isDelete;

  @Schema(description = "上传时间")
  private LocalDateTime createTime;

  @Schema(description = "拥有者ID")
  private String fileOwnerId;

  @Schema(description = "拥有者ID")
  private String fileDescribe;

  @Schema(description = "OSS中的路径")
  private String fileOssPath;

  @Schema(description = "文件真实名称")
  private String fileRealName;

  @Schema(description = "文件类型")
  private String fileType;

  @Schema(description = "所在的存储室")
  private Integer fileStorageId;

  @Schema(description = "文件下载次数")
  private Integer fileDownload;

  public Integer getFileDownload() {
    return fileDownload;
  }

  public void setFileDownload(Integer fileDownload) {
    this.fileDownload = fileDownload;
  }

  public Integer getFileStorageId() {
    return fileStorageId;
  }

  public void setFileStorageId(Integer fileStorageId) {
    this.fileStorageId = fileStorageId;
  }

  public String getFileType() {
    return fileType;
  }

  public void setFileType(String fileType) {
    this.fileType = fileType;
  }

  public String getFileRealName() {
    return fileRealName;
  }

  public void setFileRealName(String fileRealName) {
    this.fileRealName = fileRealName;
  }

  public String getFileDescribe() {
    return fileDescribe;
  }

  public void setFileDescribe(String fileDescribe) {
    this.fileDescribe = fileDescribe;
  }

  public String getFileOssPath() {
    return fileOssPath;
  }

  public void setFileOssPath(String fileOssPath) {
    this.fileOssPath = fileOssPath;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getFileName() {
    return fileName;
  }

  public void setFileName(String fileName) {
    this.fileName = fileName;
  }

  public String getFileSuffix() {
    return fileSuffix;
  }

  public void setFileSuffix(String fileSuffix) {
    this.fileSuffix = fileSuffix;
  }

  public Integer getFilePathId() {
    return filePathId;
  }

  public void setFilePathId(Integer filePathId) {
    this.filePathId = filePathId;
  }

  public Integer getFileBucketId() {
    return fileBucketId;
  }

  public void setFileBucketId(Integer fileBucketId) {
    this.fileBucketId = fileBucketId;
  }

  public Integer getIsDelete() {
    return isDelete;
  }

  public void setIsDelete(Integer isDelete) {
    this.isDelete = isDelete;
  }

  public LocalDateTime getCreateTime() {
    return createTime;
  }

  public void setCreateTime(LocalDateTime createTime) {
    this.createTime = createTime;
  }

  public String getFileOwnerId() {
    return fileOwnerId;
  }

  public void setFileOwnerId(String fileOwnerId) {
    this.fileOwnerId = fileOwnerId;
  }

  @Override
  public String toString() {
    return "File{"
        + "id="
        + id
        + ", fileName="
        + fileName
        + ", fileSuffix="
        + fileSuffix
        + ", filePathId="
        + filePathId
        + ", fileBucketId="
        + fileBucketId
        + ", isDelete="
        + isDelete
        + ", createTime="
        + createTime
        + ", fileOwnerId="
        + fileOwnerId
        + "}";
  }
}
